//
//  MainTableViewController.m
//  BaseTools
//
//  Created by 李挺哲 on 15/8/11.
//  Copyright (c) 2015年 ltz. All rights reserved.
//

#import "MainTableViewController.h"

@interface MainTableViewController ()
{
    NSMutableArray * array;
}
@end

@implementation MainTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
     array=[NSMutableArray array];
    [array addObject:@"BaseViewController使用"];
    [array addObject:@"二维码生成与识别"];
    [array addObject:@"图片相关"];
    [array addObject:@"网络相关"];
    [array addObject:@"界面相关"];
    [array addObject:@"持久化相关"];
    [array addObject:@"断点续传"];
    [array addObject:@"硬件相关"];
    NSLog(@"%ld",array.count);
    
    [self.tableView reloadData];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    
}



-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    
    return 1;
    
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{


    return array.count;

}


-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *reuseId = @"MainTableViewCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:reuseId];
    if (cell == nil) {
        cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseId];
    }
    cell.textLabel.textAlignment=NSTextAlignmentCenter;
    cell.textLabel.text=array[indexPath.row];
    return cell;



}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    switch (indexPath.row) {
        case 0:
          
            
            break;
            
        case 1:
            
            break;
        case 2:
            
            break;
        case 3:
            
            break;
        case 4:
            
            break;
        case 5:
            
            break;
        case 6:
            
            break;
        default:
            break;
    }
    
    
    
    
    
    
    
}


@end
